package sample.tomcat.web;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import sample.tomcat.pagebean.BasePageBean;
import sample.tomcat.pagebean.RolePageBean;

@Controller
@Api("userrole相关api")

public class RoleControllerImp implements RoleController {

    @Override
    @ApiOperation("添加用户角色信息")
    @ApiImplicitParams({
    @ApiImplicitParam(paramType = "header", name = "username", dataType = "String", required = true, value = "用户的姓名", defaultValue = "zhaojigang"),
    @ApiImplicitParam(paramType = "query", name = "password", dataType = "String", required = true, value = "用户的密码", defaultValue = "wangna")
    })

    @RequestMapping(value = "/addRole", method = RequestMethod.GET)
    @ResponseBody
    public BasePageBean addRole(RolePageBean rb) {

        return new BasePageBean();
    }

    @ApiOperation("删除用户角色信息")
    @ApiImplicitParams({
    @ApiImplicitParam(paramType = "header", name = "username", dataType = "String", required = true, value = "用户的姓名", defaultValue = "zhaojigang"),
    @ApiImplicitParam(paramType = "query", name = "password", dataType = "String", required = true, value = "用户的密码", defaultValue = "wangna")
    })

    @RequestMapping(value = "/delRole", method = RequestMethod.GET)
    @ResponseBody
    @Override
    public String delRole() {
        // TODO Auto-generated method stub
        return null;
    }

    @ApiOperation("修改用户角色信息")
    @ApiImplicitParams({
    @ApiImplicitParam(paramType = "header", name = "username", dataType = "String", required = true, value = "用户的姓名", defaultValue = "zhaojigang"),
    @ApiImplicitParam(paramType = "query", name = "password", dataType = "String", required = true, value = "用户的密码", defaultValue = "wangna")
    })
    @RequestMapping(value = "/modRole", method = RequestMethod.GET)
    @ResponseBody
    @Override
    public String modRole() {
        // TODO Auto-generated method stub
        return null;
    }

    @ApiOperation("用户角色信息列表")
    @ApiImplicitParams({
    @ApiImplicitParam(paramType = "header", name = "username", dataType = "String", required = true, value = "用户的姓名", defaultValue = "zhaojigang"),
    @ApiImplicitParam(paramType = "query", name = "password", dataType = "String", required = true, value = "用户的密码", defaultValue = "wangna")
    })
    @RequestMapping(value = "/List", method = RequestMethod.GET)
    @ResponseBody
    @Override
    public List<RolePageBean> getRoles() {
        // TODO Auto-generated method stub
        return null;
    }
}
